﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mime;
using System.Reflection;
using System.Resources;
using System.Xml.Linq;
using System.Xml.XPath;
using Core;
using Core.Attributes;


namespace ReflectionLaba
{
    class Program
    {
        static void Main(string[] args)
        {
            string root = new DirectoryInfo(Environment.CurrentDirectory).Parent.Parent.FullName;
            ParserLoader parserLoader = new ParserLoader( root+"\\Parcels.config" );
            List<IParser<Result>> parsers = parserLoader.GetParsers();
            Result result = parsers[0].Parse();
            Console.WriteLine("Name \tSurname \t Age ");
            for (int i = 0; i < result.ObjNumber; i++)
            {
                Console.WriteLine(result.GetValue("Name", i) + " \t " + result.GetValue("Surname", i) + " \t " + result.GetValue("Age", i) );
            }
            Console.ReadKey();
        }
    }
}
